<?php
	ob_start();
	session_start();
	include ("config.php");
	include ("init.php");
	date_default_timezone_set(TIMEZONE);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">
	<head>
		<title><?php echo WEB_TITLE; ?></title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
		<link type="text/css" rel="stylesheet" href="css/style.css" />
		<script type="text/javascript" src="js/jquery.js"></script>
		<script type="text/javascript" src="js/site.js"></script>
		<script type="text/javascript" src="js/tooltip.js"></script>
	</head>

	<body>
		<div id="wrapper">
			<div id="header">
				<div id="logo">
					<table width="100%">
						<tbody>
							<tr>
								<td><div><?php echo ISLAND_ACRONYM; ?></div></td>
								<td><img src="images/fibrelogo_header.png" align="right" border="0"/></td>
								<td width="180"><img src="images/fibretext_header.png" align="left" border="0"/></td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
			<div id="body">
				<div id="body_left">
					<div id="menu">
						<div id="title-left">Menu</div>
						
						<a href="index.php">» Home</a>
						<a href="index.php?page=resources">» Resources</a>
						<a href="http://www.fibre.org.br" target="_blank">» FIBRE federation</a>
						
						<?php 
							if(isset($_SESSION[''.SECURITY_SESSION.''])) {
								echo "<a href='index.php?page=my_account'>» My account</a>";
								echo "<a href='index.php?page=reservation'>» Reservation</a>";
								echo "<a href='index.php?page=my_reservations'>» My reservations</a>";
								
								if($_SESSION[''.SECURITY_SESSION.'']['admin'] == 't') {
									echo "<a href='javascript:void()' id='menu_management_button'>» Management</a>";
									echo "<div id='menu_management'>
											<a href='index.php?page=manager_resources'>» Resources</a>
											<a href='index.php?page=manager_user'>» Users</a>
											<a href='index.php?page=pendency'>» Pending</a>
										  </div>";
								}
							} else {
								echo "<a href='index.php?page=request_account'>» Request account</a>";
							}
							
							echo "<a href='index.php?page=policy'>» Usage policy</a>";
							echo "<a href='index.php?page=contact'>» Contact</a>";
							
							if(isset($_SESSION[''.SECURITY_SESSION.''])) {
								echo "<a href='index.php?page=logout'>» Logout</a>";
							}
						?>
					</div>
					
					<div>
						<?php	include ("login_account.php");	?>
						
						<!-- start map -->
						<div style="margin-top:20px; text-align:center">
							<iframe width="200" height="150" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=pt-BR&amp;geocode=&amp;q=UFG-Universidade+Federal+de+Goi%C3%A1s-Campus+II,+Goi%C3%A1s,+Brasil&amp;aq=3&amp;oq=UFG+-+Universidade+Federal+de+Goi%C3%A1s,+Goi%C3%A1s,+Brasil&amp;sll=-17.883352,-51.726379&amp;sspn=0.897862,1.218109&amp;ie=UTF8&amp;hq=UFG-Universidade+Federal+de+Goi%C3%A1s-Campus+II,+Goi%C3%A1s,+Brasil&amp;ll=-15.941335,-50.135306&amp;spn=0.006295,0.006295&amp;t=m&amp;z=3&amp;output=embed">
							</iframe>
							<br />
							<small>
								<a href="https://maps.google.com/maps?f=q&amp;source=embed&amp;hl=pt-BR&amp;geocode=&amp;q=UFG-Universidade+Federal+de+Goi%C3%A1s-Campus+II,+Goi%C3%A1s,+Brasil&amp;aq=3&amp;oq=UFG+-+Universidade+Federal+de+Goi%C3%A1s,+Goi%C3%A1s,+Brasil&amp;sll=-17.883352,-51.726379&amp;sspn=0.897862,1.218109&amp;ie=UTF8&amp;hq=UFG-Universidade+Federal+de+Goi%C3%A1s-Campus+II,+Goi%C3%A1s,+Brasil&amp;ll=-15.941335,-50.135306&amp;spn=0.006295,0.006295&amp;t=m" style="color:#0000FF;text-align:left">Show island location</a>
							</small>
						</div>
						<!-- end map -->
					</div>
				</div>
				<div id="body_right">
					<div id="page_content">
						<?php
							if(isset($login_message)){
								echo $login_message;
							}else
								include ("pages.php");
						?>
					</div>
					
					<div id="footer">
						<table width="100%">
							<tbody>
								<tr>
									<td style="border-right: 1px dashed #ccc; text-align:right">
										<a href="http://www.ufg.br/" target="_blank"><img src="images/ufgFooter.jpg"></a>
										<a href="http://inf.ufg.br/" target="_blank"><img src="images/infFooter.jpg"></a>
									</td>
									
									<td align="center" width="110">
										<a href="http://www.rnp.br/" target="_blank"><img src="images/rnp_logo.png"></a>
									</td>
									
									<td align="center" width="110">
										<img src="images/cnpq_logo.png"><br/><img src="images/brasil_logo.png"/>
									</td>				
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
